package photobox.photo

class PhotoPaperPrice {

    PhotoSize  photoSize
    Float      price
    Integer     isDeal

    static final int ISDEAL_NO = 0
    static final int  ISDEAL_YES = 1

    static belongsTo = [photoPaper: PhotoPaper]

    static mapping = {
        table 'pht_photo_paper_price'
    }

    static constraints = {
        photoSize  nullable: true, unique: ['photoPaper']
        price  scale: 2, min: 0.0f, max: Float.MAX_VALUE
        isDeal  inList: [ISDEAL_NO, ISDEAL_YES]
    }
}
